<?php
/**
 * Created by PhpStorm.
 * User: qingyun
 * Date: 17/5/7
 * Time: 下午3:44
 */
namespace Admin\Controller;
use Common\Controller\AdminBaseController;

class ProductController extends AdminBaseController{
    public function index(){
        $user = session()['user']['account'];
        $list = M('product')->select();
        $this->assign('user',$user);
        $this->assign('list',$list);
        $this->display();
    }
    public function add(){

        $this->display();
    }
    public function upload(){
        $upload = uploadFile($_FILES['file'],'Upload/product/');
        $this->ajaxReturn(['data' => $upload]);
    }
    public function save(){
        dump(I('post.'));exit;
    }
}